/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sdc.event;

import sdc.utility.PropertyManager;
import sdc.net.server.comp.ComponentServer;
/**
 *
 * @author yokoe
 */
public class CheckReplicateEvent extends Event {

	private ComponentServer componentServer;

	public CheckReplicateEvent(double eventTime, ComponentServer componentServer) {
		super(eventTime);
		this.componentServer = componentServer;
	}

	@Override
	public void fire() {
		componentServer.checkReplicate();
		double interval = PropertyManager.getValueAsDouble("ReplicateCheckInterval");
		EventQueue.INSTANCE.addEvent(new CheckReplicateEvent(this.getEventTime() + interval, componentServer));
	}
}
